<?php $this -> load -> view('adminx/header'); ?>
<!-- BEGIN CONTAINER -->
<div class="page-container">
	<!-- BEGIN SIDEBAR -->
	<?php $this -> load -> view('adminx/mune'); ?>
	<!-- END SIDEBAR -->
	<!-- BEGIN CONTENT -->
	<div class="page-content-wrapper">
		<div class="page-content">
			<!-- BEGIN SAMPLE PORTLET CONFIGURATION MODAL FORM-->
			<!-- /.modal -->
			<h3 class="page-title"> <?php echo $title; ?> <small><?php echo $en; ?></small></h3>
			<div class="page-bar">
				<ul class="page-breadcrumb">
					<li>
						<i class="fa fa-home"></i>
						<a href="/adminx">首页</a>
						<i class="fa fa-angle-right"></i>
					</li>
					<li>
						<a href="#"><?php echo $title; ?></a>
					</li>
				</ul>
			</div>
			<!-- END PAGE HEADER-->
			<div class="clearfix"></div>
			<div class="row">
				<div class="col-md-12 col-sm-12">
					<!-- BEGIN REGIONAL STATS PORTLET-->
					<div class="note note-success">
						<p>1，确定收货为不可逆操作；</p>
						<p>2，支付后的订单作废，需要手动到商户平台去进行退款操作；</p>
						<p>3，支付跟踪以商户平台后端数据为准；</p>
					</div>
					<div class="portlet light ">
						<div class="portlet-title">
							<div class="caption">
								<i class="icon-share font-red-sunglo"></i>
								<span class="caption-subject font-red-sunglo bold uppercase"><?php echo $title; ?>管理</span>
							</div>
							<div class="actions">
								<a class="btn btn-circle btn-icon-only blue" href="javascript:;" onclick="alert_ts('<?php echo $this -> config -> item('xt_ts'); ?>')"> <i class=" icon-bulb"></i> </a>
								<a class="btn btn-circle btn-icon-only green refresh" href="javascript:;" > <i class="icon-refresh"></i> </a>
								<a class="btn btn-circle btn-icon-only red" href="javascript:;"><i class="icon-trash"></i></a>
								<a class="btn btn-circle btn-icon-only btn-default fullscreen" href="javascript:;"> </a>
							</div>
						</div>
						<div class="portlet-body">
							<div class="btn-toolbar margin-bottom-10">
								<form class="btn-toolbar" id="get_tbody" onkeydown="if(event.keyCode==13)return false;">
									<div class="input-group" style="max-width: 250px;margin-right: 10px;">
						                 <input type="text" class="form-control form_datetimex"  id="day1" name="day1" value="<?php echo date('Y-m-d',strtotime('-7day')); ?>">
                                          <span class="input-group-btn">
                                              <button class="btn btn-default" type="button">-</button>
                                           </span>
                                          <input type="text" class="form-control form_datetimex"  id="day2" name="day2" value="<?php echo date('Y-m-d'); ?>">
                                       </div>
                                       
                                       
									<div class="portlet-input input-inline" style="margin-left: 10px;width: 100px;">
										<div class="input-icon right">
											<i class="icon-magnifier"></i>
											<input id="key" name="key" type="text" class="form-control" placeholder="会员">
										</div>
									</div>
									
									<div class="portlet-input input-inline" style="margin-left: 10px;width: 100px;">
										<div class="input-icon right">
											<i class="icon-magnifier"></i>
											<input id="key_sp" name="key_sp" type="text" class="form-control" placeholder="商品ID">
										</div>
									</div>
									
									<div class="portlet-input input-inline" style="margin-left: 10px;width: 100px;">
										<div class="input-icon right">
											<i class="icon-magnifier"></i>
											<input id="key_phone" name="key_phone" type="text" class="form-control" placeholder="手机">
										</div>
									</div>
									
									<div class="portlet-input input-inline" style="margin-left: 10px;width: 100px;">
										<div class="input-icon right">
											<i class="icon-magnifier"></i>
											<input id="key_bill_id" name="key_bill_id" type="text" class="form-control" placeholder="订单ID">
										</div>
									</div>
									
									
									
									<div class="portlet-input input-inline">
										<select  id="page" name="page" class="form-control input-circle" style="width: 100px;">
											<option>1</option>
										</select>
									</div>
									<div class="portlet-input input-inline">
										<select  id="statex" name="state" class="form-control input-circle" style="width: 100px;">
											<option value="0">全部</option>
											<option value="-1">未支付</option>
											<option value="1">等待发货</option>
											<option value="2">待收货</option>
											<option value="3">已收货</option>
											<option value="4">作废订单</option>
										</select>
									</div>
									<?php if($this->config->item('is_app')){ ?>
									<div class="portlet-input input-inline">
										<select  id="zflx" name="zflx" class="form-control input-circle" style="width: 100px;">
											<option value="0">全部</option>
											<option value="1">app支付</option>
											<option value="2">微信支付</option>
										</select>
									</div>
									<?php } ?>
									<span>金额：</span><span id="tj_je">0</span>&nbsp;&nbsp;
									<span>数量：</span><span id="tj_numb">0</span>
								</form>
							</div>
							<div class=""></div>
							<div class="table-scrollable">
								<table class="table table-bordered table-hover">
									<thead>
										<tr>
											<th>头像</th>
											<th>个人信息</th>
											<th width="150">地址</th>
											<th>订单状态</th>
											<th>数量</th>
											<th>金额</th>
											<th>下单时间</th>
											<th>操作</th>
										</tr>
									</thead>
									<tbody id="tbody">
									</tbody>
								</table>
							</div>
						</div>
					</div>
					<!-- END REGIONAL STATS PORTLET-->
				</div>
			</div>
		</div>
	</div>
	
	
	

<div class="modal fade" id="bill_up">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
					&times;
				</button>
				<h4 class="modal-title" id="fl_title">订单处理</h4>
			</div>
			<div class="modal-body">
				<div id="content"></div>
				<form role="form" id="bill_upx" enctype="multipart/form-data">
					<div class="form-group fl_name">
						<label>物流</label>
						<select id="wl_name" class="form-control" name="wl_name">
							<?php
							$wl=$this->config->item('wl');
							foreach($wl as $k=>$v){
							?>
							<option value="<?php echo $k; ?>"><?php echo $k; ?></option>
							<?php } ?>
						</select>
					</div>
					<div class="form-group fl_name">
						<label>物流编号</label>
						<input name="idx" type="hidden" id="upidx" value="0" />
						<input id="wl_hao" name="wl_hao" type="text" class="form-control" />
					</div>
					<div class="form-group">
						<label>状态</label>
						<select class="form-control" name="state" id="statex">
							<option value="2">待收货</option>
						</select>
					</div>
				</form>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn" data-dismiss="modal">
					<i class="fa  fa-compress"></i> 
					关 闭
				</button>
				<button type="button" class="btn blue" onclick="doup_bill()">
					<i class="fa fa-send"></i> 
					发货
				</button>
			</div>
		</div>
	</div>
</div>


<div class="modal fade" id="get_zfxx_t">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
					&times;
				</button>
				<h4 class="modal-title">支付订单跟踪</h4>
			</div>
			<div class="modal-body" id="get_zfxx">
			</div>
			<div class="modal-footer">
				<button type="button" class="button button-pill" data-dismiss="modal">
					OK
				</button>
			</div>
		</div>
	</div>
</div>

<div class="modal fade" id="ewm">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
					&times;
				</button>
				<h4 class="modal-title" id="fl_title"><span id="ewm_title"></span>永久二维码</h4>
			</div>
			<div class="modal-body">
				<img style="width: 100%;" id="ewm_img" src="" class="img-responsive" />
			</div>
			<div class="modal-footer">
				<button type="button" class="btn blue" data-dismiss="modal">
					<i class="fa fa-send"></i>
					好的
				</button>
			</div>
		</div>
	</div>
</div>

	
	
	
	<!-- BEGIN QUICK SIDEBAR -->
	<?php $this -> load -> view('adminx/lt'); ?>
	<!-- END QUICK SIDEBAR -->
</div>
<!-- END CONTAINER -->
<!-- BEGIN FOOTER -->
<?php $this -> load -> view('adminx/footer'); ?>
<script>
    var _model='bill';
    var _callback=function(msg){
    	    $("#tj_je").text(msg.tj_je); 
    	    $("#tj_numb").text(msg.tj_numb); 
    }
</script>
<script src="/mex/lance/domodel.js"></script>
<script src="/mex/lance/bill.js"></script>